package com.angle.im.common.utils;

import lombok.Data;

import java.io.Serializable;

/**
 * 传递信息使用的模型类
 *
 * @author mac
 */
@Data
public class MessageModel<T> implements Serializable {

    private static final long serialVersionUID = -5886815708967912564L;

    private int retCode;

    private String message;

    private T obj;

    public MessageModel() { }

    public MessageModel(int retCode, String message) {
        this.retCode = retCode;
        this.message = message;
    }
    public MessageModel(int retCode, T obj) {
        this.retCode = retCode;
        this.obj = obj;
    }

    public MessageModel(int retCode) {
        this.retCode = retCode;
    }

    public MessageModel(int retCode, String message, T t) {
        this.retCode = retCode;
        this.message = message;
        this.obj = t;
    }

}
